<template>
  <div>
    <van-nav-bar
      :title="title"
      :left-arrow="leftArrow"
      :right-text="rightText"
      @click-left="onClickLeft"
      @click-right="onClickRight"
    />
  </div>
</template>
  
  <script>
import { NavBar } from "vant";
export default {
  name: "returnBefore",
  components: {
    VanNavBar: NavBar,
  },
  props: {
    title: {
      type: String,
      default: "",
    },
    leftArrow: {
      type: Boolean,
      default: true,
    },
    rightText:{
      type:String,
      default:''
    }
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1)
    },
    onClickRight(){
      this.$router.push('/register')
    }
  },
};
</script>
  